(1) Field of the Invention
The present invention generally relates to a bar-code reader, and more particularly to a bar-code reader in which the light beam is shaped by using an aperture so that a beam spot is an circle.
In a laser unit used as a light source of a bar-code reader, the laser beam spot is to generally elliptically-shaped. The laser beam is shaped by using an aperture so that a beam spot of the laser beam is a circle. In this case, the laser beam is diffracted by the aperture (the Fresnel diffraction). The influence of the Fresnel diffraction strongly appears on a part of the laser beam which is located at the upstream side of beam west of the laser beam.
In the recent years, bar-code readers are required to be operated at a high speed and have high performance. A bar-code reader in which scanning beams are output in various directions so that bar codes on articles can be read in various directions has been popularized. To accurately read a bar code, it is necessary to adjust an optical path length of a scanning beam so that a beam west of the scanning beam is located in a reading area in which a bar code should be read.
However, in a case where the scanning beams are output in various directions, it is difficult to adjust the beam west of every scanning beam is located in the reading area in which the bar code should be read. Thus, the parts of some of the scanning beams in which the influence of the Fresnel diffraction strongly appears may be located in the reading area.
(2) Description of the Related Art
FIG. 1 shows a conventional bar-code reader using a differential operation.
Referring to FIG. 1, the conventional bar-code reader has a photoelectric conversion unit 201, an amplifier (AMP) 202, a differentiating circuit 203, a peak detecting circuit 204, a gate generating unit 205, a black-edge generating unit 206, a white-edge generating unit 207, and a B-W width counter 208. The photoelectric conversion unit 201 converts reflected light from a bar code into electric signals. The AMP 202 amplifies infinitesimal signals into signals which can be processed. The differentiating circuit 203 differentiates the signals generated by the AMP 202 so as to generate differential waveform signals. The peak detecting circuit 204 detects minus and plus peak points of the differential waveform signals. The gate generating unit 205 generates enable signals to cause the peak detecting circuit 204 to detect the peak points. The black-edge generating unit 206 generates edge signals corresponding to the minus peak points detected by the peak detecting circuit 204. The white-edge generating unit 207 generates edge signals corresponding to the pulse peak points detected by the peak detecting unit 204. The B-W width counter 208 counts a distance between change points corresponding to the respective edge signals.
The bar-code reader using the differential operation detects peak points of the differential waveform of an electric signal, so that change points between white and black areas of a bar code can be detected. For example, in the bar-code reader as shown in FIG. 1, a bar code as shown in FIG. 4A is scanned by a scanning beam having an intensity distribution as shown in FIG. 4D. In this case, the reflected light from the bar code is converted into an electric signal by the photoelectric conversion unit 201 and the AMP 202 amplifies the electric signal so as to generate an electric signal, as shown in FIG. 14B, which can be processed by a circuit will be described later.
The differentiating circuit 203 differentiates the electric signal generated by the AMP 202 so as to generate the differential waveform signal as shown in FIG. 4C. The peak detecting unit 204 detects peak points of the differential waveform signal generated by the differentiating circuit 203 so as to obtain change points between black and white areas of the bar code. The peak detecting unit carries out a process for detecting peak points while a gate signal generated by the gate generating unit 205 is in an enable state (e.g., xe2x80x9c1xe2x80x9d). The gate generating unit 205 checks the differential waveform signal generated by the differentiating circuit 203. When the level of the differential waveform signal exceeds a specific voltage value, the gate generating unit 205 supplies an output of xe2x80x9c1xe2x80x9d to the peak detecting circuit 204. The specific voltage value is set at a value by which the change points can be detected.
In addition, the differential waveform signal generated by the differentiating circuit 203, as shown in FIG. 4C, has plus peak points corresponding to change points at each of which the bar code is changed from the black area to the white area and minus points corresponding to change points at each of which the bar code is changed from the white area to the black area.
When the peak detecting unit 204 detects a peak point of the differential waveform signal, the black-edge generating unit 206 and the white-edge generating unit 207 respectively generate edge signals in synchronism with the minus peak point and the plus peak point. The B-W width counter 208 counts a period of time between times at which the edge signals are generated.
In the conventional bar-code reader, in order to read the bar code, the B-W width counter 208 counts a period of time between times at which the edge signals are generated, that is, the difference between the change points is measured.
However, in the conventional bar-code reader, a part of a scanning beam affected by the Fresnel diffraction so as to have an intensity distribution as shown in FIG. 5D may scan a bar code in the reading area. In this case, the intensity distribution of the scanning beam greatly affects the electric signal into which the reflected light from the bar code is converted. In the differentiating operation in which the electric signal generated after the photoelectric conversion of the reflected light is differentiated, the intensity distribution of the scanning beam corresponds to the differential waveform.
That is, when the part of the scanning beam affected by the Fresnel diffraction as shown in FIG. 5D scans the bar code as show in FIG. 5A, the signal as shown in FIG. 5B is generated by the photoelectric conversion unit 201. Thus, the differential waveform has a plurality of peaks corresponding to edges of stripes of the bar code, so that a plurality of change points for each edge of a stripe are detected.
Thus, due to the influence of the Fresnel diffraction, the true change point and false change points are detected. If the distance between the false change points is measured, the bar code is erroneously read.
Accordingly, a general object of the present invention is to provide a novel and useful bar-code reader in which the disadvantages of the aforementioned prior art are eliminated.
A specific object of the present invention is to provide a bar-code reader in which the true change points corresponding to edges of stripes of a bar code can be detected by use of the scanning beam scanning a bar code in a reading area affected by the Fresnel diffraction can be detected.
The above objects of the present invention are achieved by a bar-code reader having photoelectric conversion means for converting reflected light from a bar code into an electric signal and changing point detecting means for detecting, from the electric signal generated by the photoelectric conversion means, a changing point at which a white stripe is changed to a black stripe in the bar code or a black stripe is changed to a white stripe in the bar code wherein the bar code is read based on a plurality of changing points detected by the changing point detecting means, the bar-code reader comprising: determination means for determining, based on measurement of a distance between changing points, whether a changing point is detected as a true changing point at which a white stripe or a black stripe is changed to a black stripe or a white stripe in the bar code or as a false changing point; and correcting means for correcting the changing point detected as the false changing point to the true detecting point based on the changing point determined as the true changing point.
According to the present invention, in a case where a part of the light beam affected by the Fresnel diffraction as shown in FIG. 5D scans the bar code as shown in FIG. 5A, the photoelectric conversion means outputs the electric signal as shown in FIG. 5B. The determination means uses, for example, a differential waveform signal obtained by differentiating the electric signal and determines whether a changing point is detected as the true changing point or as the false changing point. The correcting means corrects the false changing point to the true changing point.
Thus, even if a part of light beam affected by the Fresnel diffraction scans the bar code, the true changing points can be detected, so that the bar code can be accurately read.
The above objects of the present invention are also achieved by a bar-code reader having photoelectric conversion means for converting reflected light from a bar code into an electric signal, wherein changing points at which a white or black striped is changed to a black or white stripe in the bar code are detected from the electric signal generated by the photoelectric conversion means so that the bar code is read, the bar-code reader comprising: comparing means for comparing the electric signal generated by the photoelectric conversion means and a predetermined fixed voltage; and hysteresis means for processing the electric signal with a hysteresis characteristic so that influence of Fresnel diffraction on light scanning the bar code is eliminated when the electric signal is greater than the predetermined fixed voltage.
According to the present invention, in a case where a part of light beam affected by the Fresnel diffraction scans as shown in FIG. 5D scans the bar code as shown in FIG. 5A, the photoelectric conversion means outputs the electric signal as shown in FIG. 5B. For example, a differential waveform signal generated by differentiating the electric signal is used and a plurality of changing points corresponding to peak points of the differential waveform signal are generated. In this case, the false changing points are absorbed in the process with the hysteresis characteristic.
Thus, even if a part of light beam affected by the Fresnel diffraction scans the bar code, the true changing points can be detected, so that the bar code can be accurately read.
Further, the above objects of the present invention are achieved by a bar-code reader having photoelectric conversion means for converting reflected light from a bar code into an electric signal wherein changing points at which a white or black stripe is changed to a black or white stripe in the bar code are detected so that the bar code is read, the bar-code read comprising: gate signal generating means for generating a gate signal indicating that a white or black stripe is changed to a black or white stripe in the bar code; maximum detecting means for detecting for detecting a changing point having a maximum value out of a plurality of detected changing points when the gate signal generated by the gate signal generating means indicates that a white or black striped is changed to a black or white stripe; and mask signal generating means generating a mask signal which masks changing points generated before the maximum detecting means detects the changing point having the maximum value, wherein a changing point detected first after the mask signal generated by the mask signal generating means is removed is decided as the true changing point.
According to the present invention, in a case where a part of light beam affected by the Fresnel diffraction scans as shown in FIG. 5D scans the bar code as shown in FIG. 5A, the photoelectric conversion means outputs the electric signal as shown in FIG. 5B. For example, a differential waveform signal generated by differentiating the electric signal is used and a plurality of changing points corresponding to peak points of the differential waveform signal are generated. In this case, changing points generated due to the influence of the Fresnel diffraction before the changing point having the maximum value is detected by the maximum detecting means are masked by the mask signal generated by the mask signal generating means.
Thus, even if a part of light beam affected by the Fresnel diffraction scans the bar code, the true changing points can be detected, so that the bar code can be accurately read.